package com.hexacta.hrs.web.struts.actions.reports;

import java.util.HashMap;
import java.util.Map;
import org.vectrics.recruiter.struts.tag.AvailabilityStatusColor;

import com.hexacta.hrs.domain.staffing.assignment.AvailabilityStatus;
import com.hexacta.hrs.web.struts.actions.BaseReportAction;

/**
 * 
 * @author nscuri
 *
 */
public class ProjectFTEStaffingReportAction extends BaseReportAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3209424984293816595L;
	
	private String selectedDateFrom;
	private String selectedDateTo;

	private boolean onlyElegibleProjectMember = true;
	
	@Override
	protected Map<String, Object> getReportFilters() {
		
		 Map<String, Object> filters = new HashMap<String, Object>();

	        filters.put("onlyElegibleProjectMember", this.getOnlyElegibleProjectMember());
	        
	        filters.put("dateFrom", this.getSelectedDateFrom());
	        filters.put("dateTo", this.getSelectedDateTo());

	        return filters;
	}

	public void setSelectedDateFrom(String selectedDateFrom) {
		this.selectedDateFrom = selectedDateFrom;
	}

	public String getSelectedDateFrom() {
		return selectedDateFrom;
	}

	public void setSelectedDateTo(String selectedDateTo) {
		this.selectedDateTo = selectedDateTo;
	}

	public String getSelectedDateTo() {
		return selectedDateTo;
	}
	
	public String getAssignedToClientColor() {
		return AvailabilityStatusColor
				.getColor(AvailabilityStatus.AsignadoCliente);
	}

	public String getAddOnAvailableColor() {
		return AvailabilityStatusColor
				.getColor(AvailabilityStatus.AddOnAvailable);
	}

	public String getAddOnNotAvailableColor() {
		return AvailabilityStatusColor
				.getColor(AvailabilityStatus.AddOnNotAvailable);
	}

	public String getInternalColor() {
		return AvailabilityStatusColor.getColor(AvailabilityStatus.Interno);
	}

	public void setOnlyElegibleProjectMember(boolean onlyElegibleProjectMember) {
		this.onlyElegibleProjectMember = onlyElegibleProjectMember;
	}

	public boolean getOnlyElegibleProjectMember() {
		return onlyElegibleProjectMember;
	}

}
